@extends('admin._layouts.default')

@section('main')

      <div class="row-fluid ">
        <div class="span12 box gradient ">
      <div class="title">
            <div class="row-fluid">
                <h3><small class="pull-right pd10">累计发放积分：<span class="label label-danger">
            {{ $static['allpoints']['total'] }}</span>  已兑换积分：<span class="label label-info">{{ $static['usepoints']['total'] }}</span></small>
                  <i class="fa fa-credit-card"></i> 积分流水
                </h3>
            </div>
        </div><!-- End .title -->
        <div class="content">

            <table id="datatable_in" class="responsive table table-striped" style="width:100%;margin-bottom:0; ">
              <thead>
               <tr>
                 <th width="80">
                   头像
                  </th>
                  <th width="80">
                    <i class="icon-wechat"></i>昵称
                  </th>
                  <th width="80">
                    姓名
                  </th>
                  <th width="120">
                   联系方式
                  </th>
                 <th width="100">
                   身份
                 </th>
                 <th>
                   相关行为
                 </th>
                 <th width="80">
                   <i class="fa fa-credit"></i>积分
                  </th>
               </tr>
              </thead>
              <tbody>
              @foreach($points as $point)
                  @if($point->position == '1')
                   <tr>
                      <td>
                       <img class="thumbnail small" src="{{ $point->customer->avatar }}">
                      </td>
                     <td>
                        {{ $point->customer->nickname }}
                      </td>
                      <td>
                        {{ $point->customer->name }}
                     </td>
                     <td>
                        <i class=" icon-map-marker"></i> <strong>{{ $point->customer->address }}</strong><br/>
                        <i class=" icon-phone-sign"></i><strong>{{ $point->customer->tel }}</strong>
                     </td>
                     <td>
                        <strong class="color_blue"><i class="fa fa-female"></i> VIP客户</strong><br/>
                     </td>
                     <td>
                        {{ $point->action }}
                     </td>
                     <td>
                          @if($point->type == '1')
                        <span class="label label-warning pd5">
                            <i class="fa fa-plus-circle"></i> {{ $point->points }}
                        </span>
                          @else
                        <span class="label label-info pd5">
                            <i class="fa fa-minus-circle"></i> {{ $point->points }}
                        </span>
                            @endif
                      </td>
                   </tr>
                   @endif
               @endforeach
               </tbody>
            </table>
                <div class="row-fluid control-group">

                    <div class="pagination pull-right ">
                      <?php echo $points->links(); ?>
                    </div>
                </div>
                <br/>


            </div>
        </div>
        <!-- End box -->
      </div>

@stop

@section('script')
<script language="javascript" type="text/javascript" src="{{ URL::asset('web/js/plugins/jquery.peity.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('web/js/plugins/jquery.uniform.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('web/js/plugins/chosen/chosen/chosen.jquery.min.js') }}"></script>

<script language="javascript" type="text/javascript" src="{{ URL::asset('web/js/plugins/flot/jquery.flot.js') }}"></script>



<script src="{{ URL::asset('web/js/scripts.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('web/js/jnavigate.jquery.min.js') }}"></script>
@stop
